package com.zx.zxblog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.zx.zxblog.entity.dto.BlogDTO;
import com.zx.zxblog.entity.pojo.Blog;
import com.zx.zxblog.entity.pojo.SysConfig;
import com.zx.zxblog.entity.query.BaseQuery;
import com.zx.zxblog.entity.vo.BlogVO;
import com.zx.zxblog.util.R;

import java.util.List;

/**
 * className=BlogService
 * package=com.zx.zxblog.service
 * description:
 *
 * @Author:SKEZhi
 * @Create:2024/4/19 - 15:51
 * @Version: v1.0
 */
public interface BlogService extends IService<Blog> {
    // 废弃：不能显示博客的标签
    PageInfo<Blog> pageBlogs(BaseQuery query);

    //分页显示[博客管理列表]
    PageInfo<BlogVO> pageAdminBlogs(BaseQuery query);

    List<Blog> searchBlog(String keyword);

    List<Blog> getBlogListDesc();

    R saveBlog(BlogDTO blogDTO);

    PageInfo<BlogVO> pageTagsBlog(long[] tagIds, Integer pageNum, int pageSize);

    BlogDTO getBlogDTO(Long id);

    R updateBlog(BlogDTO blog);
}
